<text><span class="style7">eading This Stack</span><span class="style1"></span><span class="style13">Ÿ</span><span class="style1">     Leave stack and go (back) to the stack “Start Here”</span><span class="style13">›</span><span class="style1">      Go to next page, if mouse button held down will keep turning            the pages. Right arrow key is linked</span><span class="style13">fi</span><span class="style1">      As above, but previous page. Left arrow key is linked.</span><span class="style6">                                               Click to Continue</span></text>
</content>
<name>Help</name>
<script>on mouseUpvisual effect barn door closego to first cdend mouseUpon arrowKeyend arrowKeyon doMenuend doMenuon chooseend choose</script>
</card>
card_4599.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">e have presented a method for implementing “sticky” buttons in HyperCard, based on the combination of the HyperCard v2 active text functions and special fonts. We have designed two fonts; Sticky Button and Sticky Monaco; to draw sticky buttons in Hypercard fields and scripts respectively. Finally we have written an XFCN, Xlate, to support the quick dispatch of sticky button events.</span><span class="style7">Problems</span><span class="style1">•  The sticky buttons are noticably slower than real buttons, at least     on my Mac Plus…•  The buttons only respond to </span><span class="style2">mouseUp</span><span class="style1">, no </span><span class="style2">mouseDown</span><span class="style1"> or</span><span class="style2">     mouseWithin</span><span class="style1"> etc.•  The is a bug in HyperCards </span><span class="style2">clickText</span><span class="style1"> & </span><span class="style2">clickChunk</span><span class="style1"> functions. If     you click in the right half of a single wide-character words then    they report a hit on the following inter-word gap. Wide is    relative, this happens both with a Sticky Buttons “</span><span class="style13">€</span><span class="style1">” and     Palatino “w”…</span></text>
</content>
<content>
<layer>background</layer>
<id>12</id>
<highlight> <true /> </highlight>
</content>
<name></name>
<script></script>
</card>
card_2542.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">he slightly modified version of the dispatch script is installed in this card. Instead of send a message it just displays the message name at the bottom of the page. Try the buttons.</span><span class="style13"> </span><span class="style14"><a href="#" class="group">· Press Me! ‚</a></span><span class="style13"> </span><span class="style20"><a href="#" class="group">¯ Xlate π ˘</a></span><span class="style13"> </span><span class="style41"><a href="#" class="group">ÊSmooth BitMaps</a></span><span class="style13"></span><span class="style42"> </span><span class="style41"><a href="#" class="group">ËUS Letter</a></span><span class="style13"> </span><span class="style14"><a href="#" class="group">¯ Bang!*! ˘</a></span></text>
</content>
<name></name>
<script>on mouseUpif the short name of the target is "Text" then-- have we hit a button?put the textStyle of the clickChunk into stylif styl contains "group" then-- highlight buttonset the textStyle of the clickChunk to (styl & ",bold")-- generate message nameput Xlate(the clickText, Ident) into msg_name-- restore button-- send message to current card-- send msg_name to this cdput "Message generated:" && msg_name into cd fld "MsgId"set the textStyle of the clickChunk to stylend ifend ifend mouseUpon closeCardput empty into cd fld "MsgId"end closeCard</script>
</card>
card_2092.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">he following is a sample script to dispatch clicks on sticky buttons in a background field to handlers in the current </span><span class="style2">card</span><span class="style1">. It is based on the one used in the ΓÇ£RegionsΓÇ¥ stack. The Xlate XFCN is used to perform the mapping from sticky button name to message name.</span><span class="style45"></span><span class="style25"> on mouseUp -- have we hit a button? put the textStyle of the clickChunk into styl if styl contains "group" then -- highlight button set the textStyle of the clickChunk to (styl & ",bold") -- generate message name put Xlate(the clickText, Ident) into msg_name -- restore button set the textStyle of the clickChunk to styl -- send message to current card do "send" && msg_name && "to this cd" end if end mouseUp</span></text>
</content>
<content>
<layer>background</layer>
<id>12</id>
<highlight> <true /> </highlight>
</content>
<name></name>
<script></script>
</card>
card_8909.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">here are four Xtab resources supplied:</span><span class="style6">LowerCase, UpperCase</span><span class="style1">     Maps all upper case characters to lower case and vice-versa.</span><span class="style6">Identifier</span><span class="style1">     Maps option-(, option-), option-<, option-> (Sticky Button font     button ends) and non-breaking space to _ (underscore). Maps all     other non-HyperTalk identifier characters to (in psuedo     HyperTalk):</span><span class="style25">       NumToChar((CharToNum(c) bitAnd 0x1F) bitOr 0x80)</span><span class="style1">     That is, to an equivalent alphabetic character in the range 0x80 to     0x9F. This is the table used for sticky buttons.</span><span class="style6">None</span><span class="style1">     Null mapping table, supplied as a basis for building your own     using ResEdit.</span></text>
</content>
<content>
<layer>background</layer>
<id>12</id>
<highlight> <true /> </highlight>
</content>
<name></name>
<script></script>
</card>
card_8529.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">he HyperTalk equivalent of Xlate is:</span><span class="style25"> function Xlate input,table put empty into output repeat with i = 1 to number of chars in input put char CharToNum(char i of input) of table after output end repeat return output end Xlate</span><span class="style1">Except that Xlate is a lot faster and the table comes from an Xtab resource.</span></text>
</content>
<name></name>
<script></script>
</card>
card_8357.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">ransliterating one string character for character to another using HyperTalk is rather slow, especially if many tests need to be made on each character. Xlate is a HyperCard external function which quickly transliterates a string using a named mapping table:</span><span class="style25">              Xlate(</span><span class="style2">input string</span><span class="style1">, </span><span class="style2">table name</span><span class="style25">)</span><span class="style1"> returns </span><span class="style2">string</span><span class="style1">The </span><span class="style2">input string</span><span class="style1"> may be any HyperTalk expression. The </span><span class="style2">table name</span><span class="style1"> is the name of a </span><span class="style2">Xtab</span><span class="style1"> resource which contains the translation table. An Xtab resource is simply any array of 256 bytes, byte </span><span class="style2">i</span><span class="style1"> containing the mapping for character number </span><span class="style2">i</span><span class="style1">.</span></text>
</content>
<name></name>
<script></script>
</card>
card_7999.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">hen there are multiple sticky buttons in a field the handler needs to determine which button was hit when a mouseUp occurs and dispatch to the appropriate action. There are two main ways to code this dispatch:•  Use a sequence of conditional statements to test whether the     </span><span class="style2">clickText</span><span class="style1">, which is the button name, is equal to or contains     another string and then proceed accordingly. •  Map the </span><span class="style2">clickText</span><span class="style1"> to a message and dispatch using HyperTalks     send command.The first method is used by the previous handlers in this stack, and is suitable where there are only a few possibilities. The second method is suitable where there a large number of possibilites, for example in a handler in a background field. However, the mapping from the </span><span class="style2">clickText</span><span class="style1"> to a suitable message name is non-trival as button names are typically not valid HyperTalk identifiers.The next few pages describe how to implement the second method of dispatch and start with the description of an XFCN designed to aid the mapping problem.</span></text>
</content>
<name></name>
<script></script>
</card>
card_7728.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">f there are multiple sticky buttons in a field the </span><span class="style2">mouseUp</span><span class="style1"> handler has to distinguish between them by examining the </span><span class="style2">clickText</span><span class="style1">. The usual font used by the Script Editor is Monaco, which does not of course have the special characters which exist in Sticky Buttons, this makes typing the titles of sticky buttons as HyperTalk strings a little difficult, and rather error prone! To solve this problem a second font is provided, “Sticky Monaco”, which may be set as the Script Editor font by setting </span><span class="style2">scriptTextFont</span><span class="style1">.Try these to see the difference: </span><span class="style14"><a href="#" class="group">¯ Edit π ˘</a></span><span class="style1"> and </span><span class="style14"><a href="#" class="group">¯ Sticky Edit π ˘</a></span><span class="style1">.</span></text>
</content>
<name></name>
<script>-- hit Enter to continueon mouseUp-- make sure we're in the right fieldif the short name of the target is not "Text" thenexit mouseUpend ifput the textStyle of the clickChunk into styl-- check we hit a buttonif "group" is not in styl then exit mouseUp-- got the button, highlightset the textStyle of the clickChunk to (styl & ",bold")-- determine actionif the clickText is "¯ Edit π ˘" thenedit the script of meelse if the clickText is "¯ Sticky Edit π ˘" thenput the scriptTextFont into origset the scriptTextFont to "Sticky Monaco"edit the script of meset the scriptTextFont to origend if-- un-highlight the buttonset the textStyle of the clickChunk to stylend mouseUp</script>
</card>
card_7516.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">he following handler is a simple example of sticky buttons, it handles one button only and plays a tune just like the button on the Introduction card:</span><span class="style25">on mouseUp -- make sure we're in the right field if the short name of the target is not "Text" then exit mouseUp end if put the textStyle of the clickChunk into styl -- check we hit a button if "group" is not in styl then exit mouseUp -- got the button, highlight set the textStyle of the clickChunk to (styl & ",bold") -- perform action playTune -- un-highlight the button set the textStyle of the clickChunk to stylend mouseUp</span><span class="style1">This handler is in the card script and not the field script, the filed in is in the background and shared by most of the cards in this stack, each if which has its own </span><span class="style2">mouseUp</span><span class="style1"> handler.To try this script press: </span><span class="style14"><a href="#" class="group">· Play Tune ‚</a></span><span class="style1"> (you can safely type</span><span class="style13"> </span><span class="style42">Û-</span><span class="style12">.</span><span class="style1"> once the button has un-highlighted).</span></text>
</content>
<content>
<layer>background</layer>
<id>9</id>
<text>A Simple Example</text>
</content>
<content>
<layer>background</layer>
<id>12</id>
<highlight> <true /> </highlight>
</content>
<name></name>
<script>on mouseUp-- make sure we're in the right fieldif the short name of the target is not "Text" thenexit mouseUpend ifput the textStyle of the clickChunk into styl-- check we hit a buttonif "group" is not in styl then exit mouseUp-- got the button, highlightset the textStyle of the clickChunk to (styl & ",bold")-- perform actionplayTune-- un-highlight the buttonset the textStyle of the clickChunk to stylend mouseUp</script>
</card>
card_7330.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">)  Type the button using the Sticky Buttons font and group style.     For plain rectangular buttons add italic style, for check-boxes and     radio buttons add underline style.2)  Write a </span><span class="style2">mouseUp</span><span class="style1"> handler in the field to detect a mouse click     and perform the appropriate action. The handler cannot be a</span><span class="style2">     mouseDown</span><span class="style1"> one as </span><span class="style2">clickText</span><span class="style1"> & </span><span class="style2">clickChunk</span><span class="style1"> are not set until     mouse up. The handler may be further down the inheritence     chain, but then the handler should check </span><span class="style2">the target</span><span class="style1">.3)  The first action the handler should take is to check that the     </span><span class="style2">textStyle</span><span class="style1"> of the </span><span class="style2">clickChunk</span><span class="style1"> contains group and exit if not. If you     have other grouped but non-button text in your field your     should also check the </span><span class="style2">textFont</span><span class="style1"> and take the appropriate action if     it is not Sticky Buttons.</span></text>
</content>
<content>
<layer>background</layer>
<id>12</id>
<highlight> <true /> </highlight>
</content>
<name></name>
<script></script>
</card>
card_7151.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">he Sticky Buttons font contains of the following characters:</span><span class="style7">Standard Characters:</span><span class="style1"> </span><span class="style13">a</span><span class="style1"> – </span><span class="style13">z</span><span class="style1">, </span><span class="style13">A</span><span class="style1"> – </span><span class="style13">Z</span><span class="style1">, </span><span class="style13">1</span><span class="style1"> – </span><span class="style13">9</span><span class="style1">,</span><span class="style7"> etc.</span><span class="style1">     All the standard Chicago font characters are present. To make them easier to enter the four special symbols; </span><span class="style13"></span><span class="style1">, </span><span class="style13">Ò</span><span class="style1">, </span><span class="style13">Ú</span><span class="style1"> & </span><span class="style13">Û</span><span class="style1">; are also duplicated as option-K, option-L, option-: and option-Z respectively. These characters change their appearance according to the style; for example </span><span class="style13">A</span><span class="style1"> for plain, </span><span class="style32">A</span><span class="style1"> for italic, </span><span class="style38">A</span><span class="style1"> for bold & bold italic, and </span><span class="style42">A</span><span class="style1"> for underline.</span><span class="style7">Non-Breaking Space: </span><span class="style13"> </span><span class="style1">    When drawing text, the Macintosh </span><span class="style2">does not </span><span class="style1">use the space character from a font but rather just paints a blank space. Therefore to obtain spaces in buttons you must use the non-breaking space, option-space which is taken from the font. For example; using spaces you will get </span><span class="style13">· Go Home ‚</span><span class="style1"> instead of </span><span class="style13">· Go Home ‚</span><span class="style1">.</span><span class="style7">Button Ends: </span><span class="style13">·</span><span class="style1">, </span><span class="style13">‚</span><span class="style1">, </span><span class="style13">¯</span><span class="style1">, </span><span class="style13">˘</span><span class="style1">     These characters are option-(, option-), option-< and option-> respectively. They all change their appearance correctly according to the style. These characters are narrower than the standard HyperCard button ends and should normally be combined with a non-breaking space. For example; using non-breaking spaces gives </span><span class="style13">· Cancel ‚</span><span class="style1">, not using them gives </span><span class="style13">·Cancel‚</span><span class="style1">. Note: italic option-( & option-) produce plain round rectangle ends, a style not provided by HyperCard.</span><span class="style7">Check-boxes and Radio Buttons: </span><span class="style13">Ê</span><span class="style1">, </span><span class="style13">Ë</span><span class="style1">     These characters are option-Tand option-U respectively. Unlike the button end characters, these incoporate the correct amount of white-space, so the first character of the title should follow immediately. In bold underline style they draw as the highlighted versions; </span><span class="style43">Ê</span><span class="style1"> and </span><span class="style43">Ë</span><span class="style1">.</span><span class="style7">Icons:</span><span class="style1">     The following icons are provided by Sticky Buttons:          option-~          </span><span class="style13">Ÿ</span><span class="style1">          option-!           </span><span class="style13">⁄</span><span class="style1">          option-@         </span><span class="style13">€</span><span class="style1">       option-£          </span><span class="style13">‹</span><span class="style1">          option-$          </span><span class="style13">›</span><span class="style1">            option-%          </span><span class="style13">fi</span><span class="style1">          option-^          </span><span class="style13">fl</span><span class="style1">            option-&          </span><span class="style13">‡</span><span class="style1">          option-W      </span><span class="style13">„</span><span class="style1">            option-E           </span><span class="style13">‰</span><span class="style1">          option-R         </span><span class="style13">Â</span><span class="style1">  International Note: option-@, option-£ and option-$ are option-shift-2, option-shift-3 and option-shift-4 respectively.</span></text>
</content>
<content>
<layer>background</layer>
<id>12</id>
<highlight> <true /> </highlight>
</content>
<name></name>
<script></script>
</card>
card_5952.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">he underline style draws </span><span class="style41"><a href="#" class="group">ÊCheck Box</a></span><span class="style1"> and </span><span class="style41"><a href="#" class="group">ËRadio Button</a></span><span class="style1"> button styles. Also included in the font are some useful icons, for example </span><span class="style14"><a href="#" class="group">⁄</a></span><span class="style1"> and </span><span class="style14"><a href="#" class="group">Ÿ</a></span><span class="style1">.</span></text>
</content>
<content>
<layer>background</layer>
<id>9</id>
<text>…The Sticky Buttons Font</text>
</content>
<name></name>
<script>on mouseUpflashButtonend mouseUp</script>
</card>
card_6226.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">Sticky Buttons” is a </span><span class="style2">styled</span><span class="style1"> font; consisting of plain, bold, italic, bold italic, underline and bold underline members; which we have designed to draw HyperCard style buttons. The plain style draws </span><span class="style14"><a href="#" class="group">¯ Shadow ˘</a></span><span class="style1"> and </span><span class="style14"><a href="#" class="group">· Round Rectangle ‚</a></span><span class="style1"> button styles. The italic style draws the </span><span class="style20"><a href="#" class="group">¯ Rectangle ˘</a></span><span class="style1"> button style. Highlighted buttons are drawn with the bold styles; plain bold for </span><span class="style21"><a href="#" class="group">¯ Shadow ˘</a></span><span class="style1"> & </span><span class="style21"><a href="#" class="group">· Round Rectangle ‚</a></span><span class="style1"> and italic bold for </span><span class="style22"><a href="#" class="group">¯ Rectangle ˘</a></span><span class="style1">. </span></text>
</content>
<name></name>
<script>on mouseUpflashButtonend mouseUp</script>
</card>
card_6774.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text>Sticky buttons combine the property of “stickiness” with that of the button metaphor. Active text provides the stickiness property but only supports half of the button metaphor; that of an action being initiated by a mouse click. However, active text neither looks like buttons or highlights like them, if this could be achieved then we would have sticky buttons.     Active text could be made to look like HyperCard buttons by using a special font in a similar way to Mike Horton's “Chicago Suburbs” fonts which enable Macintosh buttons to be typed into documents. However, such simple text “buttons” would look wrong if highlighted as text & button highlighting are not the same.</text>
</content>
<name></name>
<script></script>
</card>
card_5798.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUpif not editScript("the script of this cd", "Peek of Active Text Script", "get 1") thenanswer "Sorry, not enough memory"end ifend mouseUp</script>
</part>
<content>
<layer>background</layer>
<id>3</id>
<text>Page 6 of 20</text>
</content>
<content>
<layer>background</layer>
<id>9</id>
<text>Active Text: Example Page</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text><span class="style1">he functions </span><span class="style2">clickText</span><span class="style1"> & </span><span class="style2">clickChunk</span><span class="style1"> and the group text style together allow the implementation of </span><span class="style27"><a href="#" class="group">flexible*</a></span><span class="style1"> active text. As an example of this flexibilty words on this page in italics have a popup defintion linked to them and those with </span><span class="style27"><a href="#" class="group">superscripts</a></span><span class="style29"><a href="#" class="group">ΓÇá</a></span><span class="style1"> have ΓÇ£footnotesΓÇ¥ attached which appear at the bottom of the page. Active text does not suffer the drawbacks of buttons pasted over text; the text can be edited or scrolled without undesirable results.</span></text>
</content>
<content>
<layer>card</layer>
<id>2</id>
<text><span class="style31">he clickText returns the word the reader click on. Can be used to implement ΓÇ£active textΓÇÖ.</span></text>
</content>
<content>
<layer>card</layer>
<id>3</id>
<text><span class="style31">he clickChunk returns a chunk expression (a range of characters, not word number) for the word the reader clicked on.</span></text>
</content>
<name></name>
<script>on mouseUpif the short name of the target is not "Text" then exit mouseUpput the clickText into txtput the textStyle of the clickChunk into stylif styl contains "italic" thendoDef txtelse if styl contains "group" thendoFoot txtend ifend mouseUpon doDef txtselect the clickChunklock screenshow cd fld txtunlock screen with barn door open fastwait 30lock screenhide cd fld txtunlock screen with barn door close fastend doDefon doFoot txtget "missing footnote"if txt is "superscripts†" thenget "†like this one"else if txt is "flexible*" thenget "*but not flexible enough…"else if txt contains "sticky buttons" thenget "€the point of all this!"end ifput it into cd fld "Footnote"end doFooton closeCardput empty into cd fld "Footnote"pass closeCardend closeCard</script>
</card>
card_5072.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUpif the hilite of me then show groupselse hide groupsend mouseUp</script>
</part>
<content>
<layer>background</layer>
<id>3</id>
<text>Page 5 of 20</text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text><span class="style1">n </span><span class="style27"><a href="#" class="group">HyperCard 2</a></span><span class="style1"> multiple fonts and styles may be used within a single field. In addition to the usual styles a new style </span><span class="style2">group</span><span class="style1"> is added which groups runs of characters together. Grouped character runs appear as a single word to </span><span class="style27"><a href="#" class="group">the </a></span><span class="style28"><a href="#" class="group">clickText</a></span><span class="style27"><a href="#" class="group"> function</a></span><span class="style1">. Group style operates in the same way as other text styles and may be combined with them. The group style allows both multiple words to be combined as a single piece of active text and easy definition of which parts of a text should be active. The follo</span><span class="style27"><a href="#" class="group">wing script</a></span><span class="style1">, which is installed on this page, demonstrates this:</span><span class="style25"> on mouseUp if the textStyle of the clickChunk contains "group" then answer "You clicked the group" && quote & clickText ¬ & quote end if end mouseUp</span><span class="style1">Unlike the other text styles group normally has no visible effect on the text. The HyperTalk command </span><span class="style28"><a href="#" class="group">show groups</a></span><span class="style1"> highlights grouped text by drawing a gray line underneath it, the command </span><span class="style28"><a href="#" class="group">hide groups</a></span><span class="style1"> removes the highlighting. The button below toggles the visibility of grouped text on this page.</span></text>
</content>
<content>
<layer>background</layer>
<id>12</id>
<highlight> <true /> </highlight>
</content>
<content>
<layer>background</layer>
<id>9</id>
<text><span class="style1">ctive Text: The </span><span class="style6">group</span><span class="style1"> text style</span></text>
</content>
<name></name>
<script>on mouseUpif the short name of the target is not "Text" then pass mouseUpif the textStyle of the clickChunk contains "group" thenanswer "You clicked" && quote & the clickText & quoteend ifend mouseUpon closeCardif the hilite of btn "Highlight Grouped Text" thenclick at the loc of btn "Highlight Grouped Text"end ifpass closeCardend closeCard</script>
</card>
card_2868.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">ctive Text: The click</span><span class="style6">x</span><span class="style1"> Functions</span></text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text><span class="style2">lickText</span><span class="style1"> and </span><span class="style2">clickChunk</span><span class="style1"> are two functions which return the word in a field the reader clicked on and a </span><span class="style2">chunk expression</span><span class="style1"> describing that word respectively. As an example the script of this page responds to mouse clicks by calling these functions and displaying the results in a dialog. The script which performs this is:</span><span class="style25"> on mouseUp answer "You clicked" && quote & the clickText & quote && ¬ "which is" && the clickChunk end mouseUp</span><span class="style1">Note that HyperCard takes the defintion of a </span><span class="style2">word</span><span class="style1"> literally when evaluating the clickText function; clicking on punctuation or other symbols will return an empty string. However, if you click on a non-word character then the clickChunk will still return a valid chunk expression for it.</span></text>
</content>
<content>
<layer>background</layer>
<id>12</id>
<highlight> <true /> </highlight>
</content>
<name></name>
<script>on mouseUpif the short name of the target is not "Text" then pass mouseUpanswer "You clicked" && quote & the clickText & quote && "which is" ¬&& the clickChunkend mouseUp</script>
</card>
card_6652.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style6">ctive Text</span><span class="style1"> in HyperCard v2</span></text>
</content>
<content>
<layer>background</layer>
<id>2</id>
<text><span class="style1">ur method for sticky buttons is built upon the new </span><span class="style2">active text</span><span class="style1"> features introduced in HyperCard version 2. Active text is text which is capable of responding to actions by the reader, such as clicking on the text with a pointing device. In HyperCard version 2 three functions; </span><span class="style2">clickText</span><span class="style1">, </span><span class="style2">clickChunk</span><span class="style1"> & </span><span class="style2">clickLine</span><span class="style1">; and a new text style </span><span class="style28"><a href="#" class="group">group</a></span><span class="style1"> have been introduced to facilitate the construction of active text in fields. We start be describing these new features.</span></text>
</content>
<name></name>
<script></script>
</card>
card_9675.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style7">cknowledgements</span><span class="style1">Thanks to two of the ßeta testers of the Region Package, Ruben Leon & Olle Furburg, whose enthusiastic reaction to an earlier version of Sticky Buttons spurred me on to finish the job and do them properly. The public domain “Chicago Suburbs” fonts by Mike Horton, which were designed to allow the representation of standard Macintosh buttons & menus in documents, gave me the original idea to build sticky buttons for HyperCard.</span><span class="style7">Copyright</span><span class="style1">The fonts in this stack, “Sticky Buttons” and “Sticky Monaco”, are placed in the public domain. The code resources, “editScript” and “Xlate” are © 1990, Nigel Perry. They are free for personal use and in stacks which are free, provided this copyright and conditions of use are included. They may not be used for commercial or profit-making purposes, or in Shareware, without permission.</span></text>
</content>
<name></name>
<script></script>
</card>
card_2782.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<text><span class="style1">n HyperCard buttons are attached to either a card or a background, they cannot be attached directly to text. However, a button can be placed on top of text, for example:(Type </span><span class="style12">⌘-.</span><span class="style1"> if you get bored.) Unfortunately there are two problems with this method:•  As the button is not attached to the text but laid on top of it,    if the text is edited the button will not move. This means that    after every change the button needs to be repositioned, if the    buttons are being used for footnote references or so called “hot    links” this can be a </span><span class="style2">lot</span><span class="style1"> of work.•  The second problem should now be apparent; if the text the    button is laid upon is scrollable, then as the text is scrolled the    button stays put.The standard HyperText solution to this problem is to use </span><span class="style2">sticky</span><span class="style1"> buttons, that is buttons which are attached to, or part of, the text and move with it. Unfortunately HyperCard does not support sticky buttons, making it less useful for HyperText applications. This paper describes a method for extending HyperCard to include sticky buttons by combining the new </span><span class="style2">active</span><span class="style1"> </span><span class="style2">text</span><span class="style1"> support of version 2 with a specially written font.</span></text>
</content>
<content>
<layer>background</layer>
<id>12</id>
<highlight> <true /> </highlight>
</content>
<name></name>
<script></script>
</card>
card_5541.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
<script>on mouseUpvisual effect dissolve to grayvisual effect dissolvego to stack "Start Here"end mouseUp</script>
</part>
<part>
<id>9</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>232</left>
<top>180</top>
<right>268</right>
<bottom>210</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>26425</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Next</name>
<script>on mouseDownset lockMessages to truelock screenput the number of the next cd into tgsend closeCard to this cdgo next cdif the hilite of bg btn "Scroll" then set the style of fld "Text" to scrollingelse set the style of fld "Text" to opaqueunlock screen with wipe leftset lockMessages to falsesend openCard to cd tgend mouseDown</script>
</part>
<part>
<id>11</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>390</left>
<top>187</top>
<right>416</right>
<bottom>211</bottom>
</rect>
<style>opaque</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>25002</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>New Button</name>
<script>on mouseUpvisual effect barn door opengo cd "Help"end mouseUp</script>
</part>
<content>
<layer>background</layer>
<id>2</id>
<text>Sticky Buttons</text>
</content>
<content>
<layer>background</layer>
<id>3</id>
<text>Nigel Perry, November 1990</text>
</content>
<content>
<layer>background</layer>
<id>5</id>
<text><span class="style7">bstract</span><span class="style1"></span><span class="style2">Sticky</span><span class="style1"> buttons are buttons which are attached to text, usually scrollable, and move with it. Sticky buttons are very useful in HyperText documents, but unfortunately HyperCard does not support them. This paper describes a method for implementing sticky buttons in HyperCard by combining the use of </span><span class="style2">grouped</span><span class="style1"> text, a new feature in HyperCard 2, and special fonts.</span></text>
</content>
<content>
<layer>background</layer>
<id>6</id>
<text>Nigel Perry, Dept of Computing, Imperial College, 180 Queens Gate, London SW7, UKEmail: np@doc.ic.ac.uk</text>
</content>
<name></name>
<script>on arrowKey whichif which is "Right" thensend mouseUp to btn "Next"elseif which is not "Left" thenpass arrowKeyend ifend ifend arrowKey</script>